Page({

  /**
   * 页面的初始数据
   */
  data: {
    schema:[
      {
        label:'页面标题：',
        prop:'title',
        type:'text'
      },
    ],
    formData:{
      title: '标题'
    },
    title: '',
    result: '',
    remark: '',
    webUrl: '',
    apiName: ''
  },
  onLoad(options) {
    console.log('options', options)
    this.setData({
      title: options.title,
      zh:options.zh,
      remark: options.remark,
      webUrl: options.webUrl
    })
  },
  getFormData(e) {
    this.setData({
      formData: e.detail.formData
    })
  },
  choose1(e) {
    const that = this;
    wx.setNavigationBarTitle({
      title: this.data.formData.title,
      success(res) {
        that.setData({
          result: res,
          apiName: e.currentTarget.dataset.apiname
        })
      },
      fail(err) {
        that.setData({
          result: err,
          apiName: e.currentTarget.dataset.apiname
        })
      }
    })
    
  }
})